﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace ERP.ERPSystem.ProductionSystem.Dto
{
    /// <summary>
    /// 班次DTO
    /// </summary>
    public class ShiftDTO
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 班次名称
        /// </summary>
        public string ShiftName { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
    }

    /// <summary>
    /// 班次创建DTO (用于前端发送时间字符串)
    /// </summary>
    public class ShiftCreateDTO
    {
        /// <summary>
        /// 班次名称
        /// </summary>
        [Required(ErrorMessage = "班次名称不能为空")]
        public string ShiftName { get; set; }

        /// <summary>
        /// 开始时间 (HH:mm格式)
        /// </summary>
        [Required(ErrorMessage = "开始时间不能为空")]
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间 (HH:mm格式)
        /// </summary>
        [Required(ErrorMessage = "结束时间不能为空")]
        public string EndTime { get; set; }
    }

    /// <summary>
    /// 班次更新DTO (用于前端发送时间字符串)
    /// </summary>
    public class ShiftUpdateDTO
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 班次名称
        /// </summary>
        public string ShiftName { get; set; }

        /// <summary>
        /// 开始时间 (HH:mm格式)
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束时间 (HH:mm格式)
        /// </summary>
        public string EndTime { get; set; }
    }

    /// <summary>
    /// 班次分页结果DTO
    /// </summary>
    public class ShiftPageResultDTO
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Msg { get; set; }

        /// <summary>
        /// 总数
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public List<ShiftDTO> Data { get; set; }
    }
}
